home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / libs / libelf-0.5 / libelf-0 / libelf-0.5.2 / configure < prev    next >
Encoding:
Text File  |  1995-10-21  |  44.3 KB  |  1,628 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.4 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14. ac_help="$ac_help
  15.   --disable-nls           disable native language support"
  16.  
  17. # Initialize some variables set by options.
  18. # The variables have the same names as the options, with
  19. # dashes changed to underlines.
  20. build=NONE
  21. cache_file=./config.cache
  22. exec_prefix=NONE
  23. host=NONE
  24. no_create=
  25. nonopt=NONE
  26. no_recursion=
  27. prefix=NONE
  28. program_prefix=NONE
  29. program_suffix=NONE
  30. program_transform_name=s,x,x,
  31. silent=
  32. site=
  33. srcdir=
  34. target=NONE
  35. verbose=
  36. x_includes=NONE
  37. x_libraries=NONE
  38.  
  39. # Initialize some other variables.
  40. subdirs=
  41.  
  42. ac_prev=
  43. for ac_option
  44. do
  45.  
  46.   # If the previous option needs an argument, assign it.
  47.   if test -n "$ac_prev"; then
  48.     eval "$ac_prev=\$ac_option"
  49.     ac_prev=
  50.     continue
  51.   fi
  52.  
  53.   case "$ac_option" in
  54.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  55.   *) ac_optarg= ;;
  56.   esac
  57.  
  58.   # Accept the important Cygnus configure options, so we can diagnose typos.
  59.  
  60.   case "$ac_option" in
  61.  
  62.   -build | --build | --buil | --bui | --bu | --b)
  63.     ac_prev=build ;;
  64.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  65.     build="$ac_optarg" ;;
  66.  
  67.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  68.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  69.     ac_prev=cache_file ;;
  70.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  71.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  72.     cache_file="$ac_optarg" ;;
  73.  
  74.   -disable-* | --disable-*)
  75.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  76.     # Reject names that are not valid shell variable names.
  77.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  78.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  79.     fi
  80.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  81.     eval "enable_${ac_feature}=no" ;;
  82.  
  83.   -enable-* | --enable-*)
  84.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  85.     # Reject names that are not valid shell variable names.
  86.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  87.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  88.     fi
  89.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  90.     case "$ac_option" in
  91.       *=*) ;;
  92.       *) ac_optarg=yes ;;
  93.     esac
  94.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  95.  
  96.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  97.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  98.   | --exec | --exe | --ex)
  99.     ac_prev=exec_prefix ;;
  100.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  101.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  102.   | --exec=* | --exe=* | --ex=*)
  103.     exec_prefix="$ac_optarg" ;;
  104.  
  105.   -gas | --gas | --ga | --g)
  106.     # Obsolete; use --with-gas.
  107.     with_gas=yes ;;
  108.  
  109.   -help | --help | --hel | --he)
  110.     # Omit some internal or obsolete options to make the list less imposing.
  111.     # This message is too long to be a string in the A/UX 3.1 sh.
  112.     cat << EOF
  113. Usage: configure [options] [host]
  114. Options: [defaults in brackets after descriptions]
  115. Configuration:
  116.   --cache-file=FILE       cache test results in FILE
  117.   --help                  print this message
  118.   --no-create             do not create output files
  119.   --quiet, --silent       do not print \`checking...' messages
  120.   --version               print the version of autoconf that created configure
  121. Directory and file names:
  122.   --prefix=PREFIX         install architecture-independent files in PREFIX
  123.                           [$ac_default_prefix]
  124.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  125.                           [same as prefix]
  126.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  127.   --program-prefix=PREFIX prepend PREFIX to installed program names
  128.   --program-suffix=SUFFIX append SUFFIX to installed program names
  129.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  130. Host type:
  131.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  132.   --host=HOST             configure for HOST [guessed]
  133.   --target=TARGET         configure for TARGET [TARGET=HOST]
  134. Features and packages:
  135.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  136.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  137.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  138.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  139.   --x-includes=DIR        X include files are in DIR
  140.   --x-libraries=DIR       X library files are in DIR
  141. --enable and --with options recognized:$ac_help
  142. EOF
  143.     exit 0 ;;
  144.  
  145.   -host | --host | --hos | --ho)
  146.     ac_prev=host ;;
  147.   -host=* | --host=* | --hos=* | --ho=*)
  148.     host="$ac_optarg" ;;
  149.  
  150.   -nfp | --nfp | --nf)
  151.     # Obsolete; use --without-fp.
  152.     with_fp=no ;;
  153.  
  154.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  155.   | --no-cr | --no-c)
  156.     no_create=yes ;;
  157.  
  158.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  159.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  160.     no_recursion=yes ;;
  161.  
  162.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  163.     ac_prev=prefix ;;
  164.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  165.     prefix="$ac_optarg" ;;
  166.  
  167.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  168.   | --program-pre | --program-pr | --program-p)
  169.     ac_prev=program_prefix ;;
  170.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  171.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  172.     program_prefix="$ac_optarg" ;;
  173.  
  174.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  175.   | --program-suf | --program-su | --program-s)
  176.     ac_prev=program_suffix ;;
  177.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  178.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  179.     program_suffix="$ac_optarg" ;;
  180.  
  181.   -program-transform-name | --program-transform-name \
  182.   | --program-transform-nam | --program-transform-na \
  183.   | --program-transform-n | --program-transform- \
  184.   | --program-transform | --program-transfor \
  185.   | --program-transfo | --program-transf \
  186.   | --program-trans | --program-tran \
  187.   | --progr-tra | --program-tr | --program-t)
  188.     ac_prev=program_transform_name ;;
  189.   -program-transform-name=* | --program-transform-name=* \
  190.   | --program-transform-nam=* | --program-transform-na=* \
  191.   | --program-transform-n=* | --program-transform-=* \
  192.   | --program-transform=* | --program-transfor=* \
  193.   | --program-transfo=* | --program-transf=* \
  194.   | --program-trans=* | --program-tran=* \
  195.   | --progr-tra=* | --program-tr=* | --program-t=*)
  196.     program_transform_name="$ac_optarg" ;;
  197.  
  198.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  199.   | -silent | --silent | --silen | --sile | --sil)
  200.     silent=yes ;;
  201.  
  202.   -site | --site | --sit)
  203.     ac_prev=site ;;
  204.   -site=* | --site=* | --sit=*)
  205.     site="$ac_optarg" ;;
  206.  
  207.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  208.     ac_prev=srcdir ;;
  209.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  210.     srcdir="$ac_optarg" ;;
  211.  
  212.   -target | --target | --targe | --targ | --tar | --ta | --t)
  213.     ac_prev=target ;;
  214.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  215.     target="$ac_optarg" ;;
  216.  
  217.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  218.     verbose=yes ;;
  219.  
  220.   -version | --version | --versio | --versi | --vers)
  221.     echo "configure generated by autoconf version 2.4"
  222.     exit 0 ;;
  223.  
  224.   -with-* | --with-*)
  225.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  226.     # Reject names that are not valid shell variable names.
  227.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  228.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  229.     fi
  230.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  231.     case "$ac_option" in
  232.       *=*) ;;
  233.       *) ac_optarg=yes ;;
  234.     esac
  235.     eval "with_${ac_package}='$ac_optarg'" ;;
  236.  
  237.   -without-* | --without-*)
  238.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  239.     # Reject names that are not valid shell variable names.
  240.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  241.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  242.     fi
  243.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  244.     eval "with_${ac_package}=no" ;;
  245.  
  246.   --x)
  247.     # Obsolete; use --with-x.
  248.     with_x=yes ;;
  249.  
  250.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  251.   | --x-incl | --x-inc | --x-in | --x-i)
  252.     ac_prev=x_includes ;;
  253.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  254.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  255.     x_includes="$ac_optarg" ;;
  256.  
  257.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  258.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  259.     ac_prev=x_libraries ;;
  260.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  261.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  262.     x_libraries="$ac_optarg" ;;
  263.  
  264.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  265.     ;;
  266.  
  267.   *) 
  268.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  269.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  270.     fi
  271.     if test "x$nonopt" != xNONE; then
  272.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  273.     fi
  274.     nonopt="$ac_option"
  275.     ;;
  276.  
  277.   esac
  278. done
  279.  
  280. if test -n "$ac_prev"; then
  281.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  282. fi
  283.  
  284. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  285.  
  286. # File descriptor usage:
  287. # 0 standard input
  288. # 1 file creation
  289. # 2 errors and warnings
  290. # 3 some systems may open it to /dev/tty
  291. # 4 used on the Kubota Titan
  292. # 6 checking for... messages and results
  293. # 5 compiler messages saved in config.log
  294. if test "$silent" = yes; then
  295.   exec 6>/dev/null
  296. else
  297.   exec 6>&1
  298. fi
  299. exec 5>./config.log
  300.  
  301. echo "\
  302. This file contains any messages produced by compilers while
  303. running configure, to aid debugging if configure makes a mistake.
  304. " 1>&5
  305.  
  306. # Strip out --no-create and --no-recursion so they do not pile up.
  307. # Also quote any args containing shell metacharacters.
  308. ac_configure_args=
  309. for ac_arg
  310. do
  311.   case "$ac_arg" in
  312.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  313.   | --no-cr | --no-c) ;;
  314.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  315.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  316.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  317.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  318.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  319.   esac
  320. done
  321.  
  322. # NLS nuisances.
  323. # Only set LANG and LC_ALL to C if already set.
  324. # These must not be set unconditionally because not all systems understand
  325. # e.g. LANG=C (notably SCO).
  326. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  327. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  328.  
  329. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  330. rm -rf conftest* confdefs.h
  331. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  332. echo > confdefs.h
  333.  
  334. # A filename unique to this package, relative to the directory that
  335. # configure is in, which we can look for to find out if srcdir is correct.
  336. ac_unique_file=32.fsize.c
  337.  
  338. # Find the source files, if location was not specified.
  339. if test -z "$srcdir"; then
  340.   ac_srcdir_defaulted=yes
  341.   # Try the directory containing this script, then its parent.
  342.   ac_prog=$0
  343.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  344.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  345.   srcdir=$ac_confdir
  346.   if test ! -r $srcdir/$ac_unique_file; then
  347.     srcdir=..
  348.   fi
  349. else
  350.   ac_srcdir_defaulted=no
  351. fi
  352. if test ! -r $srcdir/$ac_unique_file; then
  353.   if test "$ac_srcdir_defaulted" = yes; then
  354.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  355.   else
  356.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  357.   fi
  358. fi
  359. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  360.  
  361. # Prefer explicitly selected file to automatically selected ones.
  362. if test -z "$CONFIG_SITE"; then
  363.   if test "x$prefix" != xNONE; then
  364.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  365.   else
  366.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  367.   fi
  368. fi
  369. for ac_site_file in $CONFIG_SITE; do
  370.   if test -r "$ac_site_file"; then
  371.     echo "loading site script $ac_site_file"
  372.     . "$ac_site_file"
  373.   fi
  374. done
  375.  
  376. if test -r "$cache_file"; then
  377.   echo "loading cache $cache_file"
  378.   . $cache_file
  379. else
  380.   echo "creating cache $cache_file"
  381.   > $cache_file
  382. fi
  383.  
  384. ac_ext=c
  385. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  386. ac_cpp='$CPP $CPPFLAGS'
  387. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  388. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  389.  
  390. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  391.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  392.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  393.     ac_n= ac_c='
  394. ' ac_t='    '
  395.   else
  396.     ac_n=-n ac_c= ac_t=
  397.   fi
  398. else
  399.   ac_n= ac_c='\c' ac_t=
  400. fi
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407. PACKAGE=libelf
  408. VERSION=0.5.2
  409.  
  410.  
  411.  
  412. MAJOR=`echo $VERSION | sed 's/\..*//'`
  413.  
  414.  
  415. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  416. set dummy ${MAKE-make}; ac_make=$2
  417. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  418.   echo $ac_n "(cached) $ac_c" 1>&6
  419. else
  420.   cat > conftestmake <<\EOF
  421. all:
  422.     @echo 'ac_maketemp="${MAKE}"'
  423. EOF
  424. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  425. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  426. if test -n "$ac_maketemp"; then
  427.   eval ac_cv_prog_make_${ac_make}_set=yes
  428. else
  429.   eval ac_cv_prog_make_${ac_make}_set=no
  430. fi
  431. rm -f conftestmake
  432. fi
  433. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  434.   echo "$ac_t""yes" 1>&6
  435.   SET_MAKE=
  436. else
  437.   echo "$ac_t""no" 1>&6
  438.   SET_MAKE="MAKE=${MAKE-make}"
  439. fi
  440.  
  441. # Extract the first word of "gcc", so it can be a program name with args.
  442. set dummy gcc; ac_word=$2
  443. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  444. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  445.   echo $ac_n "(cached) $ac_c" 1>&6
  446. else
  447.   if test -n "$CC"; then
  448.   ac_cv_prog_CC="$CC" # Let the user override the test.
  449. else
  450.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  451.   for ac_dir in $PATH; do
  452.     test -z "$ac_dir" && ac_dir=.
  453.     if test -f $ac_dir/$ac_word; then
  454.       ac_cv_prog_CC="gcc"
  455.       break
  456.     fi
  457.   done
  458.   IFS="$ac_save_ifs"
  459.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  460. fi
  461. fi
  462. CC="$ac_cv_prog_CC"
  463. if test -n "$CC"; then
  464.   echo "$ac_t""$CC" 1>&6
  465. else
  466.   echo "$ac_t""no" 1>&6
  467. fi
  468.  
  469.  
  470. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  471. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  472.   echo $ac_n "(cached) $ac_c" 1>&6
  473. else
  474.   cat > conftest.c <<EOF
  475. #ifdef __GNUC__
  476.   yes;
  477. #endif
  478. EOF
  479. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  480.   ac_cv_prog_gcc=yes
  481. else
  482.   ac_cv_prog_gcc=no
  483. fi
  484. fi
  485. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  486. if test $ac_cv_prog_gcc = yes; then
  487.   GCC=yes
  488.   if test "${CFLAGS+set}" != set; then
  489.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  490. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  491.   echo $ac_n "(cached) $ac_c" 1>&6
  492. else
  493.   echo 'void f(){}' > conftest.c
  494. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  495.   ac_cv_prog_gcc_g=yes
  496. else
  497.   ac_cv_prog_gcc_g=no
  498. fi
  499. rm -f conftest*
  500.  
  501. fi
  502.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  503.     if test $ac_cv_prog_gcc_g = yes; then
  504.       CFLAGS="-g -O"
  505.     else
  506.       CFLAGS="-O"
  507.     fi
  508.   fi
  509. else
  510.   GCC=
  511.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  512. fi
  513.  
  514. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  515. # On Suns, sometimes $CPP names a directory.
  516. if test -n "$CPP" && test -d "$CPP"; then
  517.   CPP=
  518. fi
  519. if test -z "$CPP"; then
  520. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  521.   echo $ac_n "(cached) $ac_c" 1>&6
  522. else
  523.     # This must be in double quotes, not single quotes, because CPP may get
  524.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  525.   CPP="${CC-cc} -E"
  526.   # On the NeXT, cc -E runs the code through the compiler's parser,
  527.   # not just through cpp.
  528.   cat > conftest.$ac_ext <<EOF
  529. #line 530 "configure"
  530. #include "confdefs.h"
  531. #include <assert.h>
  532. Syntax Error
  533. EOF
  534. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  535. ac_err=`grep -v '^ *+' conftest.out`
  536. if test -z "$ac_err"; then
  537.   :
  538. else
  539.   echo "$ac_err" >&5
  540.   rm -rf conftest*
  541.   CPP="${CC-cc} -E -traditional-cpp"
  542.   cat > conftest.$ac_ext <<EOF
  543. #line 544 "configure"
  544. #include "confdefs.h"
  545. #include <assert.h>
  546. Syntax Error
  547. EOF
  548. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  549. ac_err=`grep -v '^ *+' conftest.out`
  550. if test -z "$ac_err"; then
  551.   :
  552. else
  553.   echo "$ac_err" >&5
  554.   rm -rf conftest*
  555.   CPP=/lib/cpp
  556. fi
  557. rm -f conftest*
  558. fi
  559. rm -f conftest*
  560.   ac_cv_prog_CPP="$CPP"
  561. fi
  562.   CPP="$ac_cv_prog_CPP"
  563. else
  564.   ac_cv_prog_CPP="$CPP"
  565. fi
  566. echo "$ac_t""$CPP" 1>&6
  567.  
  568. ac_aux_dir=
  569. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  570.   if test -f $ac_dir/install-sh; then
  571.     ac_aux_dir=$ac_dir
  572.     ac_install_sh="$ac_aux_dir/install-sh -c"
  573.     break
  574.   elif test -f $ac_dir/install.sh; then
  575.     ac_aux_dir=$ac_dir
  576.     ac_install_sh="$ac_aux_dir/install.sh -c"
  577.     break
  578.   fi
  579. done
  580. if test -z "$ac_aux_dir"; then
  581.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  582. fi
  583. ac_config_guess=$ac_aux_dir/config.guess
  584. ac_config_sub=$ac_aux_dir/config.sub
  585. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  586.  
  587. # Find a good install program.  We prefer a C program (faster),
  588. # so one script is as good as another.  But avoid the broken or
  589. # incompatible versions:
  590. # SysV /etc/install, /usr/sbin/install
  591. # SunOS /usr/etc/install
  592. # IRIX /sbin/install
  593. # AIX /bin/install
  594. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  595. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  596. # ./install, which can be erroneously created by make from ./install.sh.
  597. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  598. if test -z "$INSTALL"; then
  599. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  600.   echo $ac_n "(cached) $ac_c" 1>&6
  601. else
  602.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  603.   for ac_dir in $PATH; do
  604.     # Account for people who put trailing slashes in PATH elements.
  605.     case "$ac_dir/" in
  606.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  607.     *)
  608.       # OSF1 and SCO ODT 3.0 have their own names for install.
  609.       for ac_prog in ginstall installbsd scoinst install; do
  610.         if test -f $ac_dir/$ac_prog; then
  611.       if test $ac_prog = install &&
  612.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  613.         # AIX install.  It has an incompatible calling convention.
  614.         # OSF/1 installbsd also uses dspmsg, but is usable.
  615.         :
  616.       else
  617.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  618.         break 2
  619.       fi
  620.     fi
  621.       done
  622.       ;;
  623.     esac
  624.   done
  625.   IFS="$ac_save_ifs"
  626.   # As a last resort, use the slow shell script.
  627.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  628. fi
  629.   INSTALL="$ac_cv_path_install"
  630. fi
  631. echo "$ac_t""$INSTALL" 1>&6
  632.  
  633. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  634. # It thinks the first close brace ends the variable substitution.
  635. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  636.  
  637. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  638.  
  639. # Extract the first word of "ranlib", so it can be a program name with args.
  640. set dummy ranlib; ac_word=$2
  641. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  642. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  643.   echo $ac_n "(cached) $ac_c" 1>&6
  644. else
  645.   if test -n "$RANLIB"; then
  646.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  647. else
  648.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  649.   for ac_dir in $PATH; do
  650.     test -z "$ac_dir" && ac_dir=.
  651.     if test -f $ac_dir/$ac_word; then
  652.       ac_cv_prog_RANLIB="ranlib"
  653.       break
  654.     fi
  655.   done
  656.   IFS="$ac_save_ifs"
  657.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  658. fi
  659. fi
  660. RANLIB="$ac_cv_prog_RANLIB"
  661. if test -n "$RANLIB"; then
  662.   echo "$ac_t""$RANLIB" 1>&6
  663. else
  664.   echo "$ac_t""no" 1>&6
  665. fi
  666.  
  667. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  668. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  669.   echo $ac_n "(cached) $ac_c" 1>&6
  670. else
  671.   rm -f conftestdata
  672. if ln -s X conftestdata 2>/dev/null
  673. then
  674.   rm -f conftestdata
  675.   ac_cv_prog_LN_S="ln -s"
  676. else
  677.   ac_cv_prog_LN_S=ln
  678. fi
  679. fi
  680. LN_S="$ac_cv_prog_LN_S"
  681. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  682.   echo "$ac_t""yes" 1>&6
  683. else
  684.   echo "$ac_t""no" 1>&6
  685. fi
  686.  
  687.  
  688.  
  689. # If we cannot run a trivial program, we must be cross compiling.
  690. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  691. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  692.   echo $ac_n "(cached) $ac_c" 1>&6
  693. else
  694.   if test "$cross_compiling" = yes; then
  695.   ac_cv_c_cross=yes
  696. else
  697. cat > conftest.$ac_ext <<EOF
  698. #line 699 "configure"
  699. #include "confdefs.h"
  700. main(){return(0);}
  701. EOF
  702. eval $ac_link
  703. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  704.   ac_cv_c_cross=no
  705. else
  706.   ac_cv_c_cross=yes
  707. fi
  708. fi
  709. rm -fr conftest*
  710. fi
  711. cross_compiling=$ac_cv_c_cross
  712. echo "$ac_t""$ac_cv_c_cross" 1>&6
  713.  
  714. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  715. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  716.   echo $ac_n "(cached) $ac_c" 1>&6
  717. else
  718.   cat > conftest.$ac_ext <<EOF
  719. #line 720 "configure"
  720. #include "confdefs.h"
  721. #include <stdlib.h>
  722. #include <stdarg.h>
  723. #include <string.h>
  724. #include <float.h>
  725. EOF
  726. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  727. ac_err=`grep -v '^ *+' conftest.out`
  728. if test -z "$ac_err"; then
  729.   rm -rf conftest*
  730.   ac_cv_header_stdc=yes
  731. else
  732.   echo "$ac_err" >&5
  733.   rm -rf conftest*
  734.   ac_cv_header_stdc=no
  735. fi
  736. rm -f conftest*
  737.  
  738. if test $ac_cv_header_stdc = yes; then
  739.   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  740. cat > conftest.$ac_ext <<EOF
  741. #line 742 "configure"
  742. #include "confdefs.h"
  743. #include <string.h>
  744. EOF
  745. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  746.   egrep "memchr" >/dev/null 2>&1; then
  747.   :
  748. else
  749.   rm -rf conftest*
  750.   ac_cv_header_stdc=no
  751. fi
  752. rm -f conftest*
  753.  
  754. fi
  755.  
  756. if test $ac_cv_header_stdc = yes; then
  757.   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  758. cat > conftest.$ac_ext <<EOF
  759. #line 760 "configure"
  760. #include "confdefs.h"
  761. #include <stdlib.h>
  762. EOF
  763. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  764.   egrep "free" >/dev/null 2>&1; then
  765.   :
  766. else
  767.   rm -rf conftest*
  768.   ac_cv_header_stdc=no
  769. fi
  770. rm -f conftest*
  771.  
  772. fi
  773.  
  774. if test $ac_cv_header_stdc = yes; then
  775.   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  776. if test "$cross_compiling" = yes; then
  777.   ac_cv_header_stdc=no
  778. else
  779. cat > conftest.$ac_ext <<EOF
  780. #line 781 "configure"
  781. #include "confdefs.h"
  782. #include <ctype.h>
  783. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  784. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  785. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  786. int main () { int i; for (i = 0; i < 256; i++)
  787. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  788. exit (0); }
  789.  
  790. EOF
  791. eval $ac_link
  792. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  793.   :
  794. else
  795.   ac_cv_header_stdc=no
  796. fi
  797. fi
  798. rm -fr conftest*
  799. fi
  800. fi
  801. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  802. if test $ac_cv_header_stdc = yes; then
  803.   cat >> confdefs.h <<\EOF
  804. #define STDC_HEADERS 1
  805. EOF
  806.  
  807. fi
  808.  
  809. for ac_hdr in unistd.h
  810. do
  811. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  812. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  813. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  814.   echo $ac_n "(cached) $ac_c" 1>&6
  815. else
  816.   cat > conftest.$ac_ext <<EOF
  817. #line 818 "configure"
  818. #include "confdefs.h"
  819. #include <$ac_hdr>
  820. EOF
  821. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  822. ac_err=`grep -v '^ *+' conftest.out`
  823. if test -z "$ac_err"; then
  824.   rm -rf conftest*
  825.   eval "ac_cv_header_$ac_safe=yes"
  826. else
  827.   echo "$ac_err" >&5
  828.   rm -rf conftest*
  829.   eval "ac_cv_header_$ac_safe=no"
  830. fi
  831. rm -f conftest*
  832. fi
  833. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  834.   echo "$ac_t""yes" 1>&6
  835.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  836.   cat >> confdefs.h <<EOF
  837. #define $ac_tr_hdr 1
  838. EOF
  839.  
  840. else
  841.   echo "$ac_t""no" 1>&6
  842. fi
  843. done
  844.  
  845.  
  846. install_headers=''
  847.  
  848.  
  849. echo $ac_n "checking for elf.h""... $ac_c" 1>&6
  850. if eval "test \"`echo '$''{'libelf_cv_header_elf_h'+set}'`\" = set"; then
  851.   echo $ac_n "(cached) $ac_c" 1>&6
  852. else
  853.   libelf_cv_header_elf_h=''
  854.   cat > conftest.$ac_ext <<EOF
  855. #line 856 "configure"
  856. #include "confdefs.h"
  857. #include <elf.h>
  858. EOF
  859. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  860. ac_err=`grep -v '^ *+' conftest.out`
  861. if test -z "$ac_err"; then
  862.   rm -rf conftest*
  863.   libelf_cv_header_elf_h='elf.h'
  864. else
  865.   echo "$ac_err" >&5
  866.   rm -rf conftest*
  867.   cat > conftest.$ac_ext <<EOF
  868. #line 869 "configure"
  869. #include "confdefs.h"
  870. #include <sys/elf.h>
  871. EOF
  872. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  873. ac_err=`grep -v '^ *+' conftest.out`
  874. if test -z "$ac_err"; then
  875.   rm -rf conftest*
  876.   libelf_cv_header_elf_h='sys/elf.h'
  877. else
  878.   echo "$ac_err" >&5
  879. fi
  880. rm -f conftest*
  881. fi
  882. rm -f conftest*
  883. fi
  884.  
  885. if test -n "$libelf_cv_header_elf_h"; then
  886.   echo "$ac_t""$libelf_cv_header_elf_h" 1>&6
  887.   elf_h="$libelf_cv_header_elf_h"
  888.         echo $ac_n "checking where Elf32_Dyn is declared""... $ac_c" 1>&6
  889.   if eval "test \"`echo '$''{'libelf_cv_struct_elf32_dyn'+set}'`\" = set"; then
  890.   echo $ac_n "(cached) $ac_c" 1>&6
  891. else
  892.   libelf_cv_struct_elf32_dyn='not found'
  893.     for file in "$elf_h" 'link.h'
  894.     do
  895.       cat > conftest.$ac_ext <<EOF
  896. #line 897 "configure"
  897. #include "confdefs.h"
  898. #include <$file>
  899. int main() { return 0; }
  900. int t() {
  901. Elf32_Dyn x;
  902. ; return 0; }
  903. EOF
  904. if eval $ac_compile; then
  905.   rm -rf conftest*
  906.   libelf_cv_struct_elf32_dyn="$file"
  907.         break
  908. fi
  909. rm -f conftest*
  910.  
  911.     done
  912. fi
  913.  
  914.   echo "$ac_t""$libelf_cv_struct_elf32_dyn" 1>&6
  915.   if test "$libelf_cv_struct_elf32_dyn" = 'not found'; then
  916.     { echo "configure: error: no declaration for Elf32_Dyn" 1>&2; exit 1; }
  917.   else
  918.     if test "$libelf_cv_struct_elf32_dyn" = 'link.h'; then
  919.       cat >> confdefs.h <<\EOF
  920. #define NEED_LINK_H 1
  921. EOF
  922.  
  923.     fi
  924.   fi
  925.         echo $ac_n "checking whether $elf_h declares struct nlist""... $ac_c" 1>&6
  926.   if eval "test \"`echo '$''{'libelf_cv_struct_nlist'+set}'`\" = set"; then
  927.   echo $ac_n "(cached) $ac_c" 1>&6
  928. else
  929.   cat > conftest.$ac_ext <<EOF
  930. #line 931 "configure"
  931. #include "confdefs.h"
  932. #include <$elf_h>
  933. int main() { return 0; }
  934. int t() {
  935. struct nlist nl;
  936. ; return 0; }
  937. EOF
  938. if eval $ac_compile; then
  939.   rm -rf conftest*
  940.   libelf_cv_struct_nlist=yes
  941. else
  942.   rm -rf conftest*
  943.   libelf_cv_struct_nlist=no
  944. fi
  945. rm -f conftest*
  946.  
  947. fi
  948.  
  949.   echo "$ac_t""$libelf_cv_struct_nlist" 1>&6
  950.   if test "$libelf_cv_struct_nlist" = yes; then
  951.     cat >> confdefs.h <<\EOF
  952. #define HAVE_STRUCT_NLIST_DECLARATION 1
  953. EOF
  954.  
  955.   fi
  956. else
  957.   echo "$ac_t""not found" 1>&6
  958.   install_headers="$install_headers elf.h"
  959.   elf_h='elf.h'
  960. fi
  961.  
  962.  
  963. echo $ac_n "checking for working const""... $ac_c" 1>&6
  964. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  965.   echo $ac_n "(cached) $ac_c" 1>&6
  966. else
  967.   cat > conftest.$ac_ext <<EOF
  968. #line 969 "configure"
  969. #include "confdefs.h"
  970.  
  971. int main() { return 0; }
  972. int t() {
  973.  
  974. /* Ultrix mips cc rejects this.  */
  975. typedef int charset[2]; const charset x;
  976. /* SunOS 4.1.1 cc rejects this.  */
  977. char const *const *ccp;
  978. char **p;
  979. /* NEC SVR4.0.2 mips cc rejects this.  */
  980. struct point {int x, y;};
  981. static struct point const zero;
  982. /* AIX XL C 1.02.0.0 rejects this.
  983.    It does not let you subtract one const X* pointer from another in an arm
  984.    of an if-expression whose if-part is not a constant expression */
  985. const char *g = "string";
  986. ccp = &g + (g ? g-g : 0);
  987. /* HPUX 7.0 cc rejects these. */
  988. ++ccp;
  989. p = (char**) ccp;
  990. ccp = (char const *const *) p;
  991. { /* SCO 3.2v4 cc rejects this.  */
  992.   char *t;
  993.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  994.  
  995.   *t++ = 0;
  996. }
  997. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  998.   int x[] = {25, 17};
  999.   const int *foo = &x[0];
  1000.   ++foo;
  1001. }
  1002. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1003.   typedef const int *iptr;
  1004.   iptr p = 0;
  1005.   ++p;
  1006. }
  1007. { /* AIX XL C 1.02.0.0 rejects this saying
  1008.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1009.   struct s { int j; const int *ap[3]; };
  1010.   struct s *b; b->j = 5;
  1011. }
  1012. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1013.   const int foo = 10;
  1014. }
  1015.  
  1016. ; return 0; }
  1017. EOF
  1018. if eval $ac_compile; then
  1019.   rm -rf conftest*
  1020.   ac_cv_c_const=yes
  1021. else
  1022.   rm -rf conftest*
  1023.   ac_cv_c_const=no
  1024. fi
  1025. rm -f conftest*
  1026.  
  1027. fi
  1028. echo "$ac_t""$ac_cv_c_const" 1>&6
  1029. if test $ac_cv_c_const = no; then
  1030.   cat >> confdefs.h <<\EOF
  1031. #define const 
  1032. EOF
  1033.  
  1034. fi
  1035.  
  1036. echo $ac_n "checking for off_t""... $ac_c" 1>&6
  1037. if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
  1038.   echo $ac_n "(cached) $ac_c" 1>&6
  1039. else
  1040.   cat > conftest.$ac_ext <<EOF
  1041. #line 1042 "configure"
  1042. #include "confdefs.h"
  1043. #include <sys/types.h>
  1044. #if STDC_HEADERS
  1045. #include <stdlib.h>
  1046. #endif
  1047. EOF
  1048. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1049.   egrep "off_t" >/dev/null 2>&1; then
  1050.   rm -rf conftest*
  1051.   ac_cv_type_off_t=yes
  1052. else
  1053.   rm -rf conftest*
  1054.   ac_cv_type_off_t=no
  1055. fi
  1056. rm -f conftest*
  1057.  
  1058. fi
  1059. echo "$ac_t""$ac_cv_type_off_t" 1>&6
  1060. if test $ac_cv_type_off_t = no; then
  1061.   cat >> confdefs.h <<\EOF
  1062. #define off_t long
  1063. EOF
  1064.  
  1065. fi
  1066.  
  1067. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1068. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1069.   echo $ac_n "(cached) $ac_c" 1>&6
  1070. else
  1071.   cat > conftest.$ac_ext <<EOF
  1072. #line 1073 "configure"
  1073. #include "confdefs.h"
  1074. #include <sys/types.h>
  1075. #if STDC_HEADERS
  1076. #include <stdlib.h>
  1077. #endif
  1078. EOF
  1079. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1080.   egrep "size_t" >/dev/null 2>&1; then
  1081.   rm -rf conftest*
  1082.   ac_cv_type_size_t=yes
  1083. else
  1084.   rm -rf conftest*
  1085.   ac_cv_type_size_t=no
  1086. fi
  1087. rm -f conftest*
  1088.  
  1089. fi
  1090. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1091. if test $ac_cv_type_size_t = no; then
  1092.   cat >> confdefs.h <<\EOF
  1093. #define size_t unsigned
  1094. EOF
  1095.  
  1096. fi
  1097.  
  1098.  
  1099. for ac_func in ftruncate memcmp memcpy memmove
  1100. do
  1101. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1102. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1103.   echo $ac_n "(cached) $ac_c" 1>&6
  1104. else
  1105.   cat > conftest.$ac_ext <<EOF
  1106. #line 1107 "configure"
  1107. #include "confdefs.h"
  1108. /* System header to define __stub macros and hopefully few prototypes,
  1109.     which can conflict with char $ac_func(); below.  */
  1110. #include <assert.h>
  1111. /* Override any gcc2 internal prototype to avoid an error.  */
  1112. char $ac_func(); 
  1113.  
  1114. int main() { return 0; }
  1115. int t() {
  1116.  
  1117. /* The GNU C library defines this for functions which it implements
  1118.     to always fail with ENOSYS.  Some functions are actually named
  1119.     something starting with __ and the normal name is an alias.  */
  1120. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1121. choke me
  1122. #else
  1123. $ac_func();
  1124. #endif
  1125.  
  1126. ; return 0; }
  1127. EOF
  1128. if eval $ac_link; then
  1129.   rm -rf conftest*
  1130.   eval "ac_cv_func_$ac_func=yes"
  1131. else
  1132.   rm -rf conftest*
  1133.   eval "ac_cv_func_$ac_func=no"
  1134. fi
  1135. rm -f conftest*
  1136.  
  1137. fi
  1138. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1139.   echo "$ac_t""yes" 1>&6
  1140.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1141.   cat >> confdefs.h <<EOF
  1142. #define $ac_tr_func 1
  1143. EOF
  1144.  
  1145. else
  1146.   echo "$ac_t""no" 1>&6
  1147. fi
  1148. done
  1149.  
  1150. for ac_func in memset
  1151. do
  1152. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1153. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1154.   echo $ac_n "(cached) $ac_c" 1>&6
  1155. else
  1156.   cat > conftest.$ac_ext <<EOF
  1157. #line 1158 "configure"
  1158. #include "confdefs.h"
  1159. /* System header to define __stub macros and hopefully few prototypes,
  1160.     which can conflict with char $ac_func(); below.  */
  1161. #include <assert.h>
  1162. /* Override any gcc2 internal prototype to avoid an error.  */
  1163. char $ac_func(); 
  1164.  
  1165. int main() { return 0; }
  1166. int t() {
  1167.  
  1168. /* The GNU C library defines this for functions which it implements
  1169.     to always fail with ENOSYS.  Some functions are actually named
  1170.     something starting with __ and the normal name is an alias.  */
  1171. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1172. choke me
  1173. #else
  1174. $ac_func();
  1175. #endif
  1176.  
  1177. ; return 0; }
  1178. EOF
  1179. if eval $ac_link; then
  1180.   rm -rf conftest*
  1181.   eval "ac_cv_func_$ac_func=yes"
  1182. else
  1183.   rm -rf conftest*
  1184.   eval "ac_cv_func_$ac_func=no"
  1185. fi
  1186. rm -f conftest*
  1187.  
  1188. fi
  1189. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1190.   echo "$ac_t""yes" 1>&6
  1191.   :
  1192. else
  1193.   echo "$ac_t""no" 1>&6
  1194. LIBOBJS="$LIBOBJS ${ac_func}.o"
  1195. fi
  1196.  
  1197. done
  1198.  
  1199. if test "$ac_cv_func_memset" = yes; then
  1200.   cat >> confdefs.h <<\EOF
  1201. #define HAVE_MEMSET 1
  1202. EOF
  1203.  
  1204. fi
  1205.  
  1206. echo $ac_n "checking whether overlapping arrays are copied correctly""... $ac_c" 1>&6
  1207. if eval "test \"`echo '$''{'libelf_cv_working_memmove'+set}'`\" = set"; then
  1208.   echo $ac_n "(cached) $ac_c" 1>&6
  1209. else
  1210.   if test "$cross_compiling" = yes; then
  1211.   libelf_cv_working_memmove=no
  1212. else
  1213. cat > conftest.$ac_ext <<EOF
  1214. #line 1215 "configure"
  1215. #include "confdefs.h"
  1216.     #include "confdefs.h"
  1217.     #if HAVE_MEMMOVE
  1218.     extern void *memmove();
  1219.     #else
  1220.     extern void bcopy();
  1221.     #define memmove(d,s,n) bcopy((s),(d),(n))
  1222.     #endif
  1223.     extern int strcmp();
  1224.     main() {
  1225.       char buf[] = "0123456789";
  1226.       memmove(buf + 1, buf, 9);
  1227.       if (strcmp(buf, "0012345678")) exit(1);
  1228.       exit(0);
  1229.     }
  1230. EOF
  1231. eval $ac_link
  1232. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1233.       libelf_cv_working_memmove=yes
  1234. else
  1235.   libelf_cv_working_memmove=no
  1236. fi
  1237. fi
  1238. rm -fr conftest*
  1239. fi
  1240.  
  1241. echo "$ac_t""$libelf_cv_working_memmove" 1>&6
  1242. if test "$libelf_cv_working_memmove" != yes; then
  1243.   cat >> confdefs.h <<\EOF
  1244. #define HAVE_BROKEN_MEMMOVE 1
  1245. EOF
  1246.  
  1247. fi
  1248.  
  1249.  
  1250.   echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
  1251.   # Check whether --enable-nls or --disable-nls was given.
  1252. enableval="$enable_nls"
  1253. if test -n "$enableval"; then
  1254.   mr_enable_nls="$enableval"
  1255. else
  1256.   mr_enable_nls=yes
  1257. fi
  1258.  
  1259.   echo "$ac_t""$mr_enable_nls" 1>&6
  1260.   
  1261.   
  1262.     if test "$mr_enable_nls" = yes; then
  1263.       
  1264.   ac_save_path="$PATH"
  1265.   PATH=/usr/local/bin:/usr/bin:/bin
  1266.   # Extract the first word of "gencat", so it can be a program name with args.
  1267. set dummy gencat; ac_word=$2
  1268. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1269. if eval "test \"`echo '$''{'ac_cv_path_GENCAT'+set}'`\" = set"; then
  1270.   echo $ac_n "(cached) $ac_c" 1>&6
  1271. else
  1272.   case "$GENCAT" in
  1273.   /*)
  1274.   ac_cv_path_GENCAT="$GENCAT" # Let the user override the test with a path.
  1275.   ;;
  1276.   *)
  1277.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1278.   for ac_dir in $PATH; do
  1279.     test -z "$ac_dir" && ac_dir=.
  1280.     if test -f $ac_dir/$ac_word; then
  1281.       ac_cv_path_GENCAT="$ac_dir/$ac_word"
  1282.       break
  1283.     fi
  1284.   done
  1285.   IFS="$ac_save_ifs"
  1286.   test -z "$ac_cv_path_GENCAT" && ac_cv_path_GENCAT=":"
  1287.   ;;
  1288. esac
  1289. fi
  1290. GENCAT="$ac_cv_path_GENCAT"
  1291. if test -n "$GENCAT"; then
  1292.   echo "$ac_t""$GENCAT" 1>&6
  1293. else
  1294.   echo "$ac_t""no" 1>&6
  1295. fi
  1296.  
  1297.   PATH="$ac_save_path"
  1298.   
  1299.   echo $ac_n "checking for catgets""... $ac_c" 1>&6
  1300.   if eval "test \"`echo '$''{'mr_cv_sys_nls_catgets'+set}'`\" = set"; then
  1301.   echo $ac_n "(cached) $ac_c" 1>&6
  1302. else
  1303.   
  1304.     cat > conftest.$ac_ext <<EOF
  1305. #line 1306 "configure"
  1306. #include "confdefs.h"
  1307. #include <nl_types.h>
  1308. int main() { return 0; }
  1309. int t() {
  1310. catgets(catopen("",0),0,0,"");return 0;
  1311. ; return 0; }
  1312. EOF
  1313. if eval $ac_link; then
  1314.   rm -rf conftest*
  1315.   mr_cv_sys_nls_catgets=yes
  1316. else
  1317.   rm -rf conftest*
  1318.   mr_cv_sys_nls_catgets=no
  1319. fi
  1320. rm -f conftest*
  1321.  
  1322.   
  1323. fi
  1324.  
  1325.   echo "$ac_t""$mr_cv_sys_nls_catgets" 1>&6
  1326.   
  1327.   
  1328.     if test "$mr_cv_sys_nls_catgets" = yes; then
  1329.       cat >> confdefs.h <<\EOF
  1330. #define HAVE_NLS 1
  1331. EOF
  1332.  
  1333.     else
  1334.       echo "configure: warning: no NLS support, feature disabled" 1>&2
  1335.     fi
  1336.   
  1337.  
  1338.  
  1339.  
  1340.     
  1341.     fi
  1342.   
  1343.  
  1344.  
  1345.  
  1346. trap '' 1 2 15
  1347. cat > confcache <<\EOF
  1348. # This file is a shell script that caches the results of configure
  1349. # tests run on this system so they can be shared between configure
  1350. # scripts and configure runs.  It is not useful on other systems.
  1351. # If it contains results you don't want to keep, you may remove or edit it.
  1352. #
  1353. # By default, configure uses ./config.cache as the cache file,
  1354. # creating it if it does not exist already.  You can give configure
  1355. # the --cache-file=FILE option to use a different cache file; that is
  1356. # what configure does when it calls configure scripts in
  1357. # subdirectories, so they share the cache.
  1358. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1359. # config.status only pays attention to the cache file if you give it the
  1360. # --recheck option to rerun configure.
  1361. #
  1362. EOF
  1363. # Ultrix sh set writes to stderr and can't be redirected directly,
  1364. # and sets the high bit in the cache file unless we assign to the vars.
  1365. (set) 2>&1 |
  1366.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1367.   >> confcache
  1368. if cmp -s $cache_file confcache; then
  1369.   :
  1370. else
  1371.   if test -w $cache_file; then
  1372.     echo "updating cache $cache_file"
  1373.     cat confcache > $cache_file
  1374.   else
  1375.     echo "not updating unwritable cache $cache_file"
  1376.   fi
  1377. fi
  1378. rm -f confcache
  1379.  
  1380. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1381.  
  1382. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1383. # Let make expand exec_prefix.
  1384. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1385.  
  1386. # Any assignment to VPATH causes Sun make to only execute
  1387. # the first set of double-colon rules, so remove it if not needed.
  1388. # If there is a colon in the path, we need to keep it.
  1389. if test "x$srcdir" = x.; then
  1390.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1391. fi
  1392.  
  1393. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1394.  
  1395. DEFS=-DHAVE_CONFIG_H
  1396.  
  1397. # Without the "./", some shells look in PATH for config.status.
  1398. : ${CONFIG_STATUS=./config.status}
  1399.  
  1400. echo creating $CONFIG_STATUS
  1401. rm -f $CONFIG_STATUS
  1402. cat > $CONFIG_STATUS <<EOF
  1403. #! /bin/sh
  1404. # Generated automatically by configure.
  1405. # Run this file to recreate the current configuration.
  1406. # This directory was configured as follows,
  1407. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1408. #
  1409. # $0 $ac_configure_args
  1410. #
  1411. # Compiler output produced by configure, useful for debugging
  1412. # configure, is in ./config.log if it exists.
  1413.  
  1414. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1415. for ac_option
  1416. do
  1417.   case "\$ac_option" in
  1418.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1419.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1420.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1421.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1422.     echo "$CONFIG_STATUS generated by autoconf version 2.4"
  1423.     exit 0 ;;
  1424.   -help | --help | --hel | --he | --h)
  1425.     echo "\$ac_cs_usage"; exit 0 ;;
  1426.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1427.   esac
  1428. done
  1429.  
  1430. ac_given_srcdir=$srcdir
  1431. ac_given_INSTALL="$INSTALL"
  1432.  
  1433. trap 'rm -fr `echo "Makefile shared/Makefile support/Makefile libelf.h config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1434.  
  1435. # Protect against being on the right side of a sed subst in config.status. 
  1436. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1437.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1438. $ac_vpsub
  1439. $extrasub
  1440. s%@CFLAGS@%$CFLAGS%g
  1441. s%@CPPFLAGS@%$CPPFLAGS%g
  1442. s%@CXXFLAGS@%$CXXFLAGS%g
  1443. s%@DEFS@%$DEFS%g
  1444. s%@LDFLAGS@%$LDFLAGS%g
  1445. s%@LIBS@%$LIBS%g
  1446. s%@exec_prefix@%$exec_prefix%g
  1447. s%@prefix@%$prefix%g
  1448. s%@program_transform_name@%$program_transform_name%g
  1449. s%@PACKAGE@%$PACKAGE%g
  1450. s%@VERSION@%$VERSION%g
  1451. s%@MAJOR@%$MAJOR%g
  1452. s%@SET_MAKE@%$SET_MAKE%g
  1453. s%@CC@%$CC%g
  1454. s%@CPP@%$CPP%g
  1455. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1456. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1457. s%@RANLIB@%$RANLIB%g
  1458. s%@LN_S@%$LN_S%g
  1459. s%@install_headers@%$install_headers%g
  1460. s%@elf_h@%$elf_h%g
  1461. s%@LIBOBJS@%$LIBOBJS%g
  1462. s%@GENCAT@%$GENCAT%g
  1463.  
  1464. CEOF
  1465. EOF
  1466. cat >> $CONFIG_STATUS <<EOF
  1467.  
  1468. CONFIG_FILES=\${CONFIG_FILES-"Makefile shared/Makefile support/Makefile libelf.h"}
  1469. EOF
  1470. cat >> $CONFIG_STATUS <<\EOF
  1471. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1472.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1473.   case "$ac_file" in
  1474.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1475.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1476.   *) ac_file_in="${ac_file}.in" ;;
  1477.   esac
  1478.  
  1479.   # Adjust relative srcdir, etc. for subdirectories.
  1480.  
  1481.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1482.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1483.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1484.     # The file is in a subdirectory.
  1485.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1486.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1487.     # A "../" for each directory in $ac_dir_suffix.
  1488.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1489.   else
  1490.     ac_dir_suffix= ac_dots=
  1491.   fi
  1492.  
  1493.   case "$ac_given_srcdir" in
  1494.   .)  srcdir=.
  1495.       if test -z "$ac_dots"; then top_srcdir=.
  1496.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1497.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1498.   *) # Relative path.
  1499.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1500.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1501.   esac
  1502.  
  1503.   case "$ac_given_INSTALL" in
  1504.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1505.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1506.   esac
  1507.   echo creating "$ac_file"
  1508.   rm -f "$ac_file"
  1509.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1510.   case "$ac_file" in
  1511.   *Makefile*) ac_comsub="1i\\
  1512. # $configure_input" ;;
  1513.   *) ac_comsub= ;;
  1514.   esac
  1515.   sed -e "$ac_comsub
  1516. s%@configure_input@%$configure_input%g
  1517. s%@srcdir@%$srcdir%g
  1518. s%@top_srcdir@%$top_srcdir%g
  1519. s%@INSTALL@%$INSTALL%g
  1520. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1521. fi; done
  1522. rm -f conftest.subs
  1523.  
  1524. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1525. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1526. #
  1527. # ac_d sets the value in "#define NAME VALUE" lines.
  1528. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1529. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1530. ac_dC='\3'
  1531. ac_dD='%g'
  1532. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1533. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1534. ac_uB='\([     ]\)%\1#\2define\3'
  1535. ac_uC=' '
  1536. ac_uD='\4%g'
  1537. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1538. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1539. ac_eB='$%\1#\2define\3'
  1540. ac_eC=' '
  1541. ac_eD='%g'
  1542.  
  1543. CONFIG_HEADERS=${CONFIG_HEADERS-"config.h"}
  1544. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1545.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1546.   case "$ac_file" in
  1547.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1548.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1549.   *) ac_file_in="${ac_file}.in" ;;
  1550.   esac
  1551.  
  1552.   echo creating $ac_file
  1553.  
  1554.   rm -f conftest.frag conftest.in conftest.out
  1555.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1556.  
  1557. EOF
  1558.  
  1559. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1560. # the proper values into config.h.in to produce config.h.  And first:
  1561. # Protect against being on the right side of a sed subst in config.status. 
  1562. # Protect against being in an unquoted here document in config.status.
  1563. rm -f conftest.vals
  1564. cat > conftest.hdr <<\EOF
  1565. s/[\\&%]/\\&/g
  1566. s%[\\$`]%\\&%g
  1567. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1568. s%ac_d%ac_u%gp
  1569. s%ac_u%ac_e%gp
  1570. EOF
  1571. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1572. rm -f conftest.hdr
  1573.  
  1574. # This sed command replaces #undef with comments.  This is necessary, for
  1575. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1576. # on some systems where configure will not decide to define it.
  1577. cat >> conftest.vals <<\EOF
  1578. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1579. EOF
  1580.  
  1581. # Break up conftest.vals because some shells have a limit on
  1582. # the size of here documents, and old seds have small limits too.
  1583. # Maximum number of lines to put in a single here document.
  1584. ac_max_here_lines=12
  1585.  
  1586. rm -f conftest.tail
  1587. while :
  1588. do
  1589.   ac_lines=`grep -c . conftest.vals`
  1590.   # grep -c gives empty output for an empty file on some AIX systems.
  1591.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1592.   # Write a limited-size here document to conftest.frag.
  1593.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1594.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1595.   echo 'CEOF
  1596.   sed -f conftest.frag conftest.in > conftest.out
  1597.   rm -f conftest.in
  1598.   mv conftest.out conftest.in
  1599. ' >> $CONFIG_STATUS
  1600.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1601.   rm -f conftest.vals
  1602.   mv conftest.tail conftest.vals
  1603. done
  1604. rm -f conftest.vals
  1605.  
  1606. cat >> $CONFIG_STATUS <<\EOF
  1607.   rm -f conftest.frag conftest.h
  1608.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1609.   cat conftest.in >> conftest.h
  1610.   rm -f conftest.in
  1611.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1612.     echo "$ac_file is unchanged"
  1613.     rm -f conftest.h
  1614.   else
  1615.     rm -f $ac_file
  1616.     mv conftest.h $ac_file
  1617.   fi
  1618. fi; done
  1619.  
  1620.  
  1621. echo timestamp > stamp-h
  1622. exit 0
  1623. EOF
  1624. chmod +x $CONFIG_STATUS
  1625. rm -fr confdefs* $ac_clean_files
  1626. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  1627.  
  1628.